package datalayer;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Datalayer {
	
	protected String url = "jdbc:mysql://localhost/animals";
	protected String user = "root";
	protected String pass = "";
	
	protected Connection conn;
	protected Statement stmt;
	protected ResultSet rs;
	
	public void openConn(){
		try {
			conn = DriverManager.getConnection(url, user, pass);
		} catch (SQLException e) {
			System.out.println("Connectie gevonden!");
			e.printStackTrace();
			System.out.println("Geen connectie");
		}
	}
	
	public void closeConn(){
		try {
			conn.close();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
